SHOW-DATABASES
SHOW-DATABASES
Name
SHOW DATABASES
Description
This statement is used to display the currently visible db
Syntax:
SHOW DATABASES [FROM catalog] [filter expr];
Note:
SHOW DATABASES
will display all database namesSHOW DATABASES FROM catalog
will display all database names from the current catalog.SHOW DATABASES filter_expr
will display filtered database names from the current catalog.SHOW DATABASES FROM catalog filter_expr
is not support yet.
Example
Display all the database names
SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| test |
| information_schema |
+--------------------+Display all database names from the catalog named 'hms_catalog'.
SHOW DATABASES from hms_catalog;
+---------------+
| Database |
+---------------+
| default |
| tpch |
+---------------+Display the filtered database names from the current catalog using the expression
like 'infor%'
.SHOW DATABASES like 'infor%';
+--------------------+
| Database |
+--------------------+
| information_schema |
+--------------------+
Keywords
SHOW, DATABASES